翻訳と辞書
Words near each other
・ Types of Bakuvian Bazaars
・ Type class
・ Type code
・ Type color
・ Type constructor
・ Type Control
・ Type conversion
・ Type D escort ship
・ Type D personality
・ Type D submarine
・ Type Description Language
・ Type design
・ Type Directors Club
・ Type enforcement
・ Type erasure
Type family
・ Type foundry
・ Type Four platform
・ Type generalization
・ Type genus
・ Type H/PJ38 130 mm naval gun
・ Type I and type II errors
・ Type I collagen
・ Type I cytokine receptor
・ Type I hair keratin
・ Type I hypersensitivity
・ Type I keratin
・ Type I Rifle
・ Type I site-specific deoxyribonuclease
・ Type I string theory


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Type family : ウィキペディア英語版
Type family

In computer science, a type family associates data types with other data types, using a type-level function defined by an open-ended collection of valid instances of input types and the corresponding output types.
Type families are a feature of some type systems that allow partial functions between types to be defined by pattern matching. This is in contrast to data type constructors, which define injective functions from all types of a particular kind to a new set of types, and type synonyms (a.k.a. typedef), which define functions from all types of a particular kind to another existing set of types using a single case.
Type families and type classes are closely related: normal type classes define partial functions from types to a collection of named ''values'' by pattern matching on the input types, while type families define partial functions from types to ''types'' by pattern matching on the input types. In fact, in many uses of type families there is a single type class which logically contains both values and types associated with each instance. A type family declared inside a type class is called an associated type.
Programming languages with support for type families or similar features include Haskell (with a common language extension),〔(【引用サイトリンク】url=http://hackage.haskell.org/trac/ghc/wiki/TypeFunctions )Standard ML (through its module system), Scala (under the name "abstract types"),〔(【引用サイトリンク】url=http://www.scala-lang.org/node/105 )〕 and C++ (through use of typedefs in templates).〔
== Variations ==
The TypeFamilies extension in the Glasgow Haskell Compiler supports both ''type synonym families'' and ''data families''. Type synonym families are the more flexible (but harder to type-check) form, permitting the types in the codomain of the type function to be any type whatsoever with the appropriate kind. Data families, on the other hand, restrict the codomain by requiring each instance to define a new type constructor for the function's result. This ensures that the function is injective, allowing clients' contexts to deconstruct the type family and obtain the original argument type.〔

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Type family」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.